package domain.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import domain.web.model.ProductView;
import domain.web.service.ProductService;

@Controller
@RequestMapping("data/product")
public class ProductController {

	@Autowired
	private ProductService productService;

	@RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
	@ResponseBody
	public ProductView getProduct(@PathVariable("id") long id) {
		return productService.getView(id);
	}
	
	
	
}
